Passed
Branch v1.0.x (7af476)
by Rafael S.
02:08
created

index.d.ts ➔ sweep   A

Complexity

Conditions 1

Size

Total Lines 21
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
dl 0
loc 21
rs 10
c 0
b 0
f 0
1
// Type definitions for frequency-sweep 1.0
2
// Project: https://github.com/rochars/bitdepth
3
// Definitions by: Rafael da Silva Rocha <https://github.com/rochars>
4
// Definitions: https://github.com/rochars/frequency-sweep
5
6
/**
7
 * Return the samples of a frequency sweep. The sweep may be divided
8
 * in segments, each using a different waveform (or noise), and each with
9
 * a start and end frequency.
10
 * @param {!Array<Object<string, string|number>>} sequence The sequence.
11
 *   Each item in the array must have the properties:
12
 *     start: Integer value, the start frequency of the segment.
13
 *     end: Integer value, the end frequency of the segment.
14
 *     time: Float value, the duration of the segment. 1 = 1 second.
15
 *     wave: String, "sine", "square", "triangle", "sawtooth" or "noise".
16
 * @param {number} sampleRate The sample rate.
17
 * @return {!Array<number>}
18
 */
19
export function sweep(
20
    sequence: Array<object>,
21
    sampleRate: number): Array<number>;
22